Optimal. Leaf size=108 \[ \frac {(g \tan (e+f x))^{p+1}}{a f g (p+1)}-\frac {\sec (e+f x) \cos ^2(e+f x)^{\frac {p+3}{2}} (g \tan (e+f x))^{p+2} \, _2F_1\left (\frac {p+2}{2},\frac {p+3}{2};\frac {p+4}{2};\sin ^2(e+f x)\right )}{a f g^2 (p+2)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 108, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {2706, 2607, 32, 2617} \[ \frac {(g \tan (e+f x))^{p+1}}{a f g (p+1)}-\frac {\sec (e+f x) \cos ^2(e+f x)^{\frac {p+3}{2}} (g \tan (e+f x))^{p+2} \, _2F_1\left (\frac {p+2}{2},\frac {p+3}{2};\frac {p+4}{2};\sin ^2(e+f x)\right )}{a f g^2 (p+2)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 32
Rule 2607
Rule 2617
Rule 2706
Rubi steps
\begin {align*} \int \frac {(g \tan (e+f x))^p}{a+a \sin (e+f x)} \, dx &=\frac {\int \sec ^2(e+f x) (g \tan (e+f x))^p \, dx}{a}-\frac {\int \sec (e+f x) (g \tan (e+f x))^{1+p} \, dx}{a g}\\ &=-\frac {\cos ^2(e+f x)^{\frac {3+p}{2}} \, _2F_1\left (\frac {2+p}{2},\frac {3+p}{2};\frac {4+p}{2};\sin ^2(e+f x)\right ) \sec (e+f x) (g \tan (e+f x))^{2+p}}{a f g^2 (2+p)}+\frac {\operatorname {Subst}\left (\int (g x)^p \, dx,x,\tan (e+f x)\right )}{a f}\\ &=\frac {(g \tan (e+f x))^{1+p}}{a f g (1+p)}-\frac {\cos ^2(e+f x)^{\frac {3+p}{2}} \, _2F_1\left (\frac {2+p}{2},\frac {3+p}{2};\frac {4+p}{2};\sin ^2(e+f x)\right ) \sec (e+f x) (g \tan (e+f x))^{2+p}}{a f g^2 (2+p)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 3.92, size = 232, normalized size = 2.15 \[ \frac {2 \tan \left (\frac {1}{2} (e+f x)\right ) \left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right )^2 (g \tan (e+f x))^p \left (\left (p^2+5 p+6\right ) \, _2F_1\left (\frac {p+1}{2},p+2;\frac {p+3}{2};\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )-(p+1) \tan \left (\frac {1}{2} (e+f x)\right ) \left (2 (p+3) \, _2F_1\left (\frac {p+2}{2},p+2;\frac {p+4}{2};\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )-(p+2) \tan \left (\frac {1}{2} (e+f x)\right ) \, _2F_1\left (p+2,\frac {p+3}{2};\frac {p+5}{2};\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )\right )\right ) \left (\cos (e+f x) \sec ^2\left (\frac {1}{2} (e+f x)\right )\right )^p}{f (p+1) (p+2) (p+3) (a \sin (e+f x)+a)} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.49, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {\left (g \tan \left (f x + e\right )\right )^{p}}{a \sin \left (f x + e\right ) + a}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (g \tan \left (f x + e\right )\right )^{p}}{a \sin \left (f x + e\right ) + a}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.47, size = 0, normalized size = 0.00 \[ \int \frac {\left (g \tan \left (f x +e \right )\right )^{p}}{a +a \sin \left (f x +e \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (g \tan \left (f x + e\right )\right )^{p}}{a \sin \left (f x + e\right ) + a}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\left (g\,\mathrm {tan}\left (e+f\,x\right )\right )}^p}{a+a\,\sin \left (e+f\,x\right )} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\left (g \tan {\left (e + f x \right )}\right )^{p}}{\sin {\left (e + f x \right )} + 1}\, dx}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________